package com.woniuxy.controller;


import com.woniuxy.commons.utile.Result;
import com.woniuxy.dao.model.RepairUnit;
import com.woniuxy.service.RepairUnitService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author Keep it simple
 * @since 2022-06-28
 */
@RestController
@Api(tags = "项目单位接口")
public class RepairUnitController {

    @Resource
    RepairUnitService repairUnitService;

    @GetMapping("/getAllUnit")
    @ApiOperation("获取全部项目单位")
    public Result getAllUnit(){
        List<RepairUnit> list = repairUnitService.list();
        return Result.instance().setData(list);
    }
}

